/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Game;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
import java.io.IOException;

/**
 * @author THINH
 */
public class GameDesign {
    
//<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0|
    private Image _26_1078792201;
    private Image brick_background;
    private Image datXauVl;
    private TiledLayer Map1_Background;
    private TiledLayer Map1_Ground;
    private Image _730_1081716125;
    private TiledLayer Map1_Wall;
//</editor-fold>//GEN-END:|fields|0|
    
//<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0|
//</editor-fold>//GEN-END:|methods|0|

    public Image get_26_1078792201() throws java.io.IOException {//GEN-BEGIN:|1-getter|0|1-preInit
        if (_26_1078792201 == null) {//GEN-END:|1-getter|0|1-preInit
            // write pre-init user code here
            _26_1078792201 = Image.createImage("/resource/background/926_1078792201.png");//GEN-BEGIN:|1-getter|1|1-postInit
        }//GEN-END:|1-getter|1|1-postInit
        // write post-init user code here
        return this._26_1078792201;//GEN-BEGIN:|1-getter|2|
    }//GEN-END:|1-getter|2|



    public Image getDatXauVl() throws java.io.IOException {//GEN-BEGIN:|3-getter|0|3-preInit
        if (datXauVl == null) {//GEN-END:|3-getter|0|3-preInit
            // write pre-init user code here
            datXauVl = Image.createImage("/resource/background/datXauVl.png");//GEN-BEGIN:|3-getter|1|3-postInit
        }//GEN-END:|3-getter|1|3-postInit
        // write post-init user code here
        return this.datXauVl;//GEN-BEGIN:|3-getter|2|
    }//GEN-END:|3-getter|2|

    public TiledLayer getMap1_Ground() throws java.io.IOException {//GEN-BEGIN:|5-getter|0|5-preInit
        if (Map1_Ground == null) {//GEN-END:|5-getter|0|5-preInit
            // write pre-init user code here
            Map1_Ground = new TiledLayer(18, 11, getDatXauVl(), 40, 40);//GEN-BEGIN:|5-getter|1|5-midInit
            int[][] tiles = {
                {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
                {0, 0, 0, 1, 2, 2, 4, 5, 0, 0, 0, 1, 3, 4, 5, 0, 0, 0},
                {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
                {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3}
            };//GEN-END:|5-getter|1|5-midInit
            // write mid-init user code here
            for (int row = 0; row < 11; row++) {//GEN-BEGIN:|5-getter|2|5-postInit
                for (int col = 0; col < 18; col++) {
                    Map1_Ground.setCell(col, row, tiles[row][col]);
                }
            }
        }//GEN-END:|5-getter|2|5-postInit
        // write post-init user code here
        return Map1_Ground;//GEN-BEGIN:|5-getter|3|
    }//GEN-END:|5-getter|3|

    public void updateLayerManagerForMap1(LayerManager lm) throws java.io.IOException {//GEN-LINE:|6-updateLayerManager|0|6-preUpdate
        // write pre-update user code here
        getMap1_Ground().setPosition(0, 0);//GEN-BEGIN:|6-updateLayerManager|1|6-postUpdate
        getMap1_Ground().setVisible(true);
        lm.append(getMap1_Ground());
        getMap1_Wall().setPosition(-40, 0);
        getMap1_Wall().setVisible(true);
        lm.append(getMap1_Wall());
        getMap1_Background().setPosition(0, 0);
        getMap1_Background().setVisible(true);
        lm.append(getMap1_Background());//GEN-END:|6-updateLayerManager|1|6-postUpdate
        // write post-update user code here
    }//GEN-LINE:|6-updateLayerManager|2|

    public Image get_730_1081716125() throws java.io.IOException {//GEN-BEGIN:|22-getter|0|22-preInit
        if (_730_1081716125 == null) {//GEN-END:|22-getter|0|22-preInit
            // write pre-init user code here
            _730_1081716125 = Image.createImage("/resource/background/1730_1081716125.png");//GEN-BEGIN:|22-getter|1|22-postInit
        }//GEN-END:|22-getter|1|22-postInit
        // write post-init user code here
        return this._730_1081716125;//GEN-BEGIN:|22-getter|2|
    }//GEN-END:|22-getter|2|





    public Image getBrick_background() throws java.io.IOException {//GEN-BEGIN:|70-getter|0|70-preInit
        if (brick_background == null) {//GEN-END:|70-getter|0|70-preInit
            // write pre-init user code here
            brick_background = Image.createImage("/resource/background/brick_background.png");//GEN-BEGIN:|70-getter|1|70-postInit
        }//GEN-END:|70-getter|1|70-postInit
        // write post-init user code here
        return this.brick_background;//GEN-BEGIN:|70-getter|2|
    }//GEN-END:|70-getter|2|



    public TiledLayer getMap1_Wall() throws java.io.IOException {//GEN-BEGIN:|135-getter|0|135-preInit
        if (Map1_Wall == null) {//GEN-END:|135-getter|0|135-preInit
            // write pre-init user code here
            Map1_Wall = new TiledLayer(20, 11, getDatXauVl(), 40, 40);//GEN-BEGIN:|135-getter|1|135-midInit
            int[][] tiles = {
                {44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24},
                {44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24},
                {44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24},
                {44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24},
                {44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24},
                {44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24},
                {44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24},
                {44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24},
                {44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24},
                {44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24},
                {44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24}
            };//GEN-END:|135-getter|1|135-midInit
            // write mid-init user code here
            for (int row = 0; row < 11; row++) {//GEN-BEGIN:|135-getter|2|135-postInit
                for (int col = 0; col < 20; col++) {
                    Map1_Wall.setCell(col, row, tiles[row][col]);
                }
            }
        }//GEN-END:|135-getter|2|135-postInit
        // write post-init user code here
        return Map1_Wall;//GEN-BEGIN:|135-getter|3|
    }//GEN-END:|135-getter|3|



    public TiledLayer getMap1_Background() throws java.io.IOException {//GEN-BEGIN:|174-getter|0|174-preInit
        if (Map1_Background == null) {//GEN-END:|174-getter|0|174-preInit
            // write pre-init user code here
            Map1_Background = new TiledLayer(1, 1, getBrick_background(), 720, 440);//GEN-BEGIN:|174-getter|1|174-midInit
            int[][] tiles = {
                {1}
            };//GEN-END:|174-getter|1|174-midInit
            // write mid-init user code here
            for (int row = 0; row < 1; row++) {//GEN-BEGIN:|174-getter|2|174-postInit
                for (int col = 0; col < 1; col++) {
                    Map1_Background.setCell(col, row, tiles[row][col]);
                }
            }
        }//GEN-END:|174-getter|2|174-postInit
        // write post-init user code here
        return Map1_Background;//GEN-BEGIN:|174-getter|3|
    }//GEN-END:|174-getter|3|
    
}
